package cn.yes.like;

import cn.yes.like.Human;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

public class App {
    public static void main(String[] arge) throws Exception{
        Class<?> HH = Class.forName("cn.yes.like.Human");
        Object x=HH.newInstance();
        Field name = HH.getDeclaredField("name");
        name.setAccessible(true);
        name.set(x,"花花");
        Method getName = HH.getMethod("getName");
        System.out.println(getName.invoke(x));

    }
}
